﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.ServiceModel.DomainServices.Client;
using Fdd.Aspen.Services.Web.PresentationModel;

namespace Fdd.Aspen.Client
{
    public partial class EditMember : UserControl
    {
        public static readonly DependencyProperty memberProperty =
            DependencyProperty.Register("Member",
                                        typeof(MemberPM),
                                        typeof(EditMember),
                                        new PropertyMetadata(MemberPropertyChanged));


        public MemberPM Member
        {
            get { return (MemberPM)GetValue(memberProperty); }
            set { SetValue(memberProperty, value); }
        }


        public static void MemberPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
                var editMemberControl = d as EditMember;
                editMemberControl.memberForm.DataContext = e.NewValue;
        }


        public EditMember()
        {
            InitializeComponent();
        }
    }
}
